<template>
  <!--<el-radio-group v-model="item.indicatorsActVal">
    <div v-for="option in options">
      <el-radio :label="option.key">
        {{ option.key }}
      </el-radio>
    </div>
  </el-radio-group>-->
  <el-form :ref="'form' + item.itemName">
    <el-form-item :label="item.itemName == 1?'':item.itemName" :label-width="labelWith" :class="item.remark?'test':''" :disabled="isFinish">
      <el-radio-group v-model="item.indicatorsActVal">
        <el-radio v-for="(option, index) in options" :label="option.key" :key="index">
          {{ option.key }}
        </el-radio>
      </el-radio-group>
    </el-form-item>
  </el-form>
</template>

<script>
  import {searchDict} from "@/api/dict";

  export default {
    name: "MyRadio",
    props: {
      isFinish:{
        type:Boolean,
        default:false
      },
      item: Object,
      labelWith: {
        type: String,
        default: ""
      }
    },
    created() {
      searchDict({id: this.item.dictId}).then(response => {
        if (response.code === 200) {
          this.options = response.page.filter(function (item) {
            return item.available;
          });
        }
      });
    },
    data() {
      return {
        options: [],
        style: "min-width: 250px !important;"
      };
    },
    methods: {}
  };
</script>

<style lang="scss">
  .infoItem {
    .test {
      .el-form-item__label {
        text-align: left;
        width: 480px !important;
      }
    }
  }
</style>
